package com.cn.springcloudshop.controller;

import com.cn.springcloudshop.service.inter.WeChatFeignClient;
import org.apache.xmlbeans.impl.xb.xsdschema.Public;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.servlet.http.HttpServletRequest;

@RestController
public class TestController {
    @Autowired
    WeChatFeignClient weChatFeignClient;
    @RequestMapping("/test1")
    public  void get(HttpServletRequest request){
        System.out.println(request.getSession().getId());
        weChatFeignClient.hi();
    }
    @RequestMapping("/test2")
    public  String get2(HttpServletRequest request){
        System.out.println(request.getSession().getId());
        String openid = weChatFeignClient.getOpenid();
        System.out.println("shop2:"+openid);
        return openid;
    }
}
